/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.com.minam.beans;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.security.core.GrantedAuthority;

/**
 *
 * @author Willian
 */
@Entity
@Table(name = "PERFILES")
public class Perfil implements GrantedAuthority, Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    private String id;

    @Column(name = "perfil")
    private String nombrePerfil;

    public Perfil() {
    }

    @JsonIgnore
    public String getNombrePerfil() {
        return nombrePerfil;
    }

    public void setNombrePerfil(String nombrePerfil) {
        this.nombrePerfil = nombrePerfil;
    }

    @Override
    @JsonIgnore
    public String getAuthority() {
        return this.id;
    }

    @JsonIgnore
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

}
